import request from '@/utils/request'

// 获取操作人数据
export function getOperator(params) {
  return request({
    url: '/api/back/account/accountList',
    method: 'get',
    params
  })
}

// 删除账号
export function delAccount(data) {
  return request({
    url: '/api/back/account/deleteAccount',
    method: 'post',
    data
  })
}

// 修改密码
export function changePsd(data) {
  return request({
    url: '/api/back/admin/updatePwd',
    method: 'post',
    data
  })
}

export function addAuth({ admin_id, name, phone, job, account, password, auth }) {
  return request({
    url: '/api/back/account/createUpdateAccount',
    method: 'post',
    data: { admin_id, name, phone, job, account, password, auth }
  })
}
export function getAuthInfo(admin_id) {
  return request({
    url: '/api/back/account/editAccount',
    method: 'get',
    params: { admin_id }
  })
}
